package com.atguigu.util;

import lombok.Data;

@Data
public class Result {
    private String message;
    private Object obj;
    private boolean flag;

   public static Result ok(Object obj){
       Result result=new Result();
       result.setFlag(true);
       result.setObj(obj);
       return result;
   }

   public static Result error(String message){
       Result result=new Result();
       result.setFlag(false);
        result.setMessage(message);
       return result;
   }
}
